package demo.rpc;

import demo.entity.User;
import jk.fox.annotaion.RpcService;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * @author cuichao
 * @Description: DemoServiceImpl
 * @Date: create in 2020/6/2 21:20
 */
@RpcService
public class DemoServiceImpl implements DemoService {

    private Map<String ,User> userMap = new LinkedHashMap<>();

    {
        userMap.put("1",new User("1","xiaoming"));
        userMap.put("2",new User("2","xiaohong"));
    }


    @Override
    public User getUser(String id) {
        return userMap.get(id);
    }
}
